package com.leo.apptest.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.leo.apptest.R;

import java.util.List;

/**
 * Created by zhangguobao on 16/10/17.
 */
public class TestRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
    private List<String> mDataList;

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new TestHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_test_recycler, parent,false));
    }

    public void setDatas(List<String> dataList){
        mDataList = dataList;
        notifyDataSetChanged();
    }

    public void setDatas(){
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 5;
    }

    private class TestHolder extends RecyclerView.ViewHolder {
        public TestHolder(View view) {
            super(view);
        }
    }
}
